<?php

/**
 * This is the model class for table "pencarikerjasbtempatkan".
 *
 * The followings are the available columns in table 'pencarikerjasbtempatkan':
 * @property integer $pksbt_id
 * @property string $pendidikantamat
 * @property integer $slakilaki
 * @property integer $sperempuan
 * @property integer $sjumlah
 * @property integer $blakilaki
 * @property integer $bperempuan
 * @property integer $bjumlah
 * @property integer $tahun
 */
class Pencarikerjasbtempatkan extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Pencarikerjasbtempatkan the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'pencarikerjasbtempatkan';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('slakilaki, sperempuan, sjumlah, blakilaki, bperempuan, bjumlah, tahun', 'numerical', 'integerOnly'=>true),
			array('pendidikantamat', 'length', 'max'=>50),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('pksbt_id, pendidikantamat, slakilaki, sperempuan, sjumlah, blakilaki, bperempuan, bjumlah, tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'pksbt_id' => 'Pksbt',
			'pendidikantamat' => 'Pendidikantamat',
			'slakilaki' => 'Slakilaki',
			'sperempuan' => 'Sperempuan',
			'sjumlah' => 'Sjumlah',
			'blakilaki' => 'Blakilaki',
			'bperempuan' => 'Bperempuan',
			'bjumlah' => 'Bjumlah',
			'tahun' => 'Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('pksbt_id',$this->pksbt_id);
		$criteria->compare('pendidikantamat',$this->pendidikantamat,true);
		$criteria->compare('slakilaki',$this->slakilaki);
		$criteria->compare('sperempuan',$this->sperempuan);
		$criteria->compare('sjumlah',$this->sjumlah);
		$criteria->compare('blakilaki',$this->blakilaki);
		$criteria->compare('bperempuan',$this->bperempuan);
		$criteria->compare('bjumlah',$this->bjumlah);
		$criteria->compare('tahun',$this->tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}